var request = require('request');
var io = require('socket.io-client')
//this is only for test
var WS_HOSTNAME = '127.0.0.1';
var WS_PORT = 3000;
var client = io.connect('ws://' + WS_HOSTNAME + ':' + WS_PORT);
client.on('connect', function (data) {
    console.log('ws connected!');
    client.emit('login', { userid: 1 });
    //client.send('hi,there!');
});

client.on('play', function (data) {
    var url = data.url;
    console.log(url);
});

client.on('pause', function (data) {
    var url = data.url;
    console.log(url);
});
